// hyb_yl/backstageServices/pages/chufangjianyi/chufangjianyi.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    xufang:"",
    counttime:"",
    copyright:[
      { imgs: "https://6a69-jin5201-a4503e-1257013711.tcb.qcloud.la/renzheng.png?sign=99d87d2d65c67c848a10aaf43bafb66e&t=1583825248", text: "药监认证" },
      { imgs: "https://6a69-jin5201-a4503e-1257013711.tcb.qcloud.la/people.png?sign=717fc4019448bfc2a03ac538022f7ed8&t=1583825298", text: "药师审核" },
      { imgs: "https://6a69-jin5201-a4503e-1257013711.tcb.qcloud.la/yinsi.png?sign=f45888dbb9b06874e8d079f99d6018f5&t=1583825342", text: "隐私包装" },
    ]
  },
  lookoriginal(){
    wx.navigateTo({
      url: '/hyb_yl/zhuanjiasubpages/pages/zhifuend/zhifuend?txt=yes',
    })
  },
  atpay(){
    wx.navigateTo({
      url: '/hyb_yl/backstageServices/pages/drupmespay/drupmespay',
    })
  },
  countDown(times) {
    var timer = null;var self = this;
    timer = setInterval(function () {
      var hour = 0,
        minute = 0,
        second = 0;//时间默认值
      if (times > 0) {
        // day = Math.floor(times / (60 * 60 * 24));
        hour = Math.floor(times / (60 * 60));
        minute = Math.floor(times / 60) - (hour * 60);
        second = Math.floor(times) - (hour * 60 * 60) - (minute * 60);
      }
      // if (day <= 9) day = '0' + day;
      if (hour <= 9) hour = '0' + hour;
      if (minute <= 9) minute = '0' + minute;
      if (second <= 9) second = '0' + second;
      //
      self.setData({
        counttime: hour + ":" + minute + ":" + second
      })
      times--;
    }, 1000);
    if (times <= 0) {
      clearInterval(timer);
    }
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var bgc = wx.getStorageSync('color')
    wx.setNavigationBarColor({
      frontColor: "#ffffff",
      backgroundColor: bgc,
    })
    if (options.xufang){
      this.setData({ xufang: options.xufang})
    }
    this.countDown(55555)
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})